package com.fxhy.service;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.fxhy.bean.IdCardInfo;
import com.fxhy.repository.IdCardInfoRepository;

@Service
public class IdCardInfoService {
	@Autowired
	private IdCardInfoRepository idCardInfoRepository;

	public IdCardInfo saveIdCardInfo(IdCardInfo card) {
		return idCardInfoRepository.saveAndFlush(card);
	}

	public IdCardInfo findCardByUserId(Integer userId) {
		return idCardInfoRepository.findByUserId(userId);
	}
	
	
}
